package cn.txm.basic.constant;

/**
 * TODO
 * 系统相关常量类
 * @author Administrator
 * @version 1.0
 * @date 2021/1/11 14:28
 */
public class Constant {
    /**
     * 通过手机验证码注册
     */
    public static final String PHONE_REG = "phone_reg";
    /**
     * 通过手机验证码登录
     */
    public static final String PHONE_LOGIN = "phone_login";


    /**
     * 微信手机验证码绑定
     */
    public static final String BIND_PHONE ="bind_phone";
    /**
     * 微信账号密码绑定
     */
    public static final String BIND_ACCOUNT ="bind_account";


    /**
     * 通过邮箱注册
     */
    public static final String EMAIL_REG = "email_reg";
    /**
     * 前台用户登录
     */
    public static final String FRONT = "front";
    /**
     * 后台用户登录
     */
    public static final String ADMIN = "admin";
    /**
     * 当前登录用户在Redis中的key
     */
    public static final String KEY_OF_LOGINUSER = "loginUser";
    /**
     * Redis中存贮登录用户对象的过期时间 30分钟
     */
    public static final Integer EXPIRE_TIME_IN_REDIS = 30 * 60;
    /**
     * 请求头中存放token的请求头名称
     */
    public static final String TOKEN_REQUEST_HEADER = "userToken";

    /**
     * SMS短信平台相关常量
     */
    public static final String SMS_UID = "Hinata";
    public static final String SMS_KEY = "d41d8cd98f00b204e980";


    /**
     * 数据状态：正常
     */
    public static final Integer STATE_NORMAL = 0;
    /**
     * 数据状态：待审核
     */
    public static final Integer STATE_AUDIT = 1;
    /**
     * 数据状态：待激活
     */
    public static final Integer STATE_ACTIVE = 2;
    /**
     * 数据状态：禁用
     */
    public static final Integer STATE_DISABLED = -1;

    /**
     * 微信登录相关常量：通过code获取access_token的url
     */
    public static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
    public static final String WECHAT_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID";
    /**
     * APPID
     */
    public static final String APPID = "wxd853562a0548a7d0";
    /**
     * 密钥
     */
    public static final String APPSECRET = "4a5d5615f93f24bdba2ba8534642dbb6";

    /**
     * 百度地图服务端API：密钥
     */
    public static final String BAIDU_SERVICE_AK = "7yIGnem3sGjOO20QtCC2Kl3so9XfLFlq";

    /**
     * 以下支付宝相关常量
     */
    public static final String BUSINESS_TYPE_ADOPT = "business_type_adopt";         //宠物领养订单
    public static final String BUSINESS_TYPE_PRODUCT = "business_type_product";     //商品服务订单
}
